package com.ti.demo.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @description: com.ti.demo.entity
 * @Author Triagen
 * @Date 2024/2/26 15:29
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WeatherInfo {

    private List<Alarm> alarm;

    @JsonProperty("location")
    private Location location;

    private Now now;

    private String jieQi;

    private String lastUpdate;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class Alarm {
        private String effective;

        private String eventType;

        private String id;

        private String severity;

        private String signallevel;

        private String signaltype;

        private String title;

        private String type;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class Location {
        private String id;

        private String name;

        private String path;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class Now {
        private Double precipitation;

        private Double temperature;

        private Double pressure;

        private Double humidity;

        private Double feelst;

        private String windDirection;

        private Double windDirectionDegree;

        private Double windSpeed;

        private String windScale;
    }
}
